package com.hjl.sr.util;

public class ArrayUtil {
	
	public static boolean startWith(byte[] baseArray, byte[] compareArray) {
		if (compareArray == null) {
			return true;
		}
		if (baseArray == null) {
			return false;
		}
		int baseLength = baseArray.length;
		int compareLength = compareArray.length;
		if (compareLength > baseLength) {
			return false;
		}
		for (int i = 0; i < compareLength; ++i) {
			byte b = baseArray[i];
			byte c = compareArray[i];
			if (b != c) {
				return false;
			}
		}
		return true;
	}
	
}
